package com.jason.learn.springcloud.searchservice.controller;

import com.jason.learn.springcloud.searchservice.dto.PageResult;
import com.jason.learn.springcloud.searchservice.enty.BuyOrder;
import com.jason.learn.springcloud.searchservice.service.EsBuyOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/esBuyOrder")
public class EsBuyOrderController {
    @Autowired
    private EsBuyOrderService service;

    @RequestMapping("/searchByTime")
    public PageResult<BuyOrder> searchBuyOrder(Date queryBeginDate, Date queryEndDate, int page, int pageSize){
       return service.searchBuyOrder(queryBeginDate,queryEndDate,page,pageSize);
    }
}
